<?php include'views/templates/layouts/backend/header.php'; ?>
<!--Messager-->
<?php

if(isset($messager) && $messager!="")
{
    ?>
    <br>
    <div class="alert alert-success">
        <button class="close" data-dismiss="alert">×</button>
        <strong>Success!</strong> The page has been added.
    </div>
<?php
}
?>
<?php

if(isset($mes_del) && $mes_del!="")
{
    ?>
    <br>
    <div class="alert alert-success">
        <button class="close" data-dismiss="alert">×</button>
        <strong>Success!</strong> The page has been deleted.
    </div>
<?php
}
?>

<!--End Messager-->

    <div class="widget-box">
    <div class="widget-title">

        <h5>List repost</h5>
       <h5> <a href="index.php?controller=user&action=add">Add record!</a></h5>
    </div>
    <div class="widget-content nopadding">
    <table class="table table-bordered table-striped table-hover data-table">
    <thead>
    <tr>
        <th>Title</th>
        <th>Content</th>
        <th>Email</th>
        <th>Action</th>
    </tr>
    </thead>
        <tbody>
        <?php
                    while($row = mysqli_fetch_array($listUsers))
                    {

        ?>
            <tr class="gradeX">
                <td><?php echo $row['f_name']; ?></td>
                <td><?php echo $row['l_name']; ?></td>
                <td ><?php echo $row['email']; ?></td>
                <td class="taskOptions">
<!--                    Div for dialog view-->
                    <div id="myModal" class="modal hide">
                        <div class="modal-header">
                            <button data-dismiss="modal" class="close" type="button">×</button>
                            <h3>Modal header</h3>
                        </div>
                        <div class="modal-body">
                            <p>One fine body…</p>
                        </div>
                    </div>
                    <a href="#myModal" data-toggle="modal" class="tip-top" data-original-title="View"><i class="icon-th"></i></a>
<!--                    /Div for dialog view-->
                    <div id="myAlert" class="modal hide">
                        <div class="modal-header">
                            <button data-dismiss="modal" class="close" type="button">×</button>
                            <h3>Alert modal</h3>
                        </div>
                        <div class="modal-body">
                            <p>Lorem ipsum dolor sit amet...</p>
                        </div>
                        <div class="modal-footer">
                            <a data-dismiss="modal" class="btn btn-primary" href="#">Confirm</a>
                            <a data-dismiss="modal" class="btn" href="#">Cancel</a>
                        </div>
                    </div>

                    <a href="#myAlert"  data-toggle="modal" class="tip-top" data-original-title="Edit"><i class="icon-edit"></i></a>

                    <a href="index.php?controller=user&action=delete&id=<?php echo $row['id']; ?>" class="tip-top" data-original-title="Delete"><i class="icon-remove"></i></a>
                </td>
            </tr>
                <?php
                    }
                ?>
        </tbody>
    </table>
             </div>
            </div>
        </div>
    </div>
<!--Fram Modal diago-->
<!--Fram thouth mini-->

    <div class="span6">

<!--        /.span6-->
    </div>


<?php include'views/templates/layouts/backend/footer.php'; ?>